@model IEnumerable<viBook.Models.Book>
@{
    ViewBag.Title = "Search Result";
    var searchContent = ViewBag.SearchContent as string;
}

<div class="group">
@if (@Model.Count() == 0)
{
    <div class="full">
        <h1>
            <em>Your search - @searchContent- did not match any books.</em> 
        </h1>
    </div>}
else
{
       <div class="full">
        <h1>
            <em>Search Results for</em> @searchContent
        </h1>
    </div>
}
</div>
<div id="main">
    <div class="results group">
        <h2 class="section">
            @Model.Count() <span class="meta">Books</span>
        </h2>
        <ol class="dribbbles group">
            @*List items*@
            <div data-bind='template: { name: "book-template", foreach: listBook }' id="uploaded-book">
            </div>
        </ol>
    </div>
    <div class="page">
        @*Pager*@
        <div class="pagination">
            <a class="next_page" rel="next" id="prev" data-bind="visible: isShowPrevBtn,click: fetchPreviousCommentPage">
                Previous</a> (Page <span data-bind="text: viewmodel.bookPageNo()"></span> of
            <span data-bind="text: viewmodel.totalBookPage()"></span>) <a class="next_page" rel="next"
                id="next" data-bind="visible: isShowNextBtn,click: fetchNextCommentPage">Next</a>
        </div>
    </div>
</div>
<div id="secondary">
        @Html.Partial("~/Views/Home/SecondaryTemplate.cshtml")
</div>
@Html.Partial("~/Views/Home/BookControlTemplate.cshtml")
@Html.Partial("SearchResultJS")
